# $Id: PKGBUILD 78247 2012-10-17 10:26:53Z allan $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
pkgbase=python-pytools
pkgname=('python2-pytools' 'python-pytools')
pkgver=2011.5
pkgrel=4
pkgdesc="A collection of tools for Python"
arch=('any')
url="http://mathema.tician.de/software/pytools"
license=('MIT')
makedepends=('python2-distribute' 'python-distribute')
source=(http://pypi.python.org/packages/source/p/pytools/pytools-${pkgver}.tar.gz)
sha1sums=('ebaeb51b2a80b9d5f487868ded240430a736b750')

build() {
   cd "${srcdir}"

   cp -a pytools-${pkgver}{,-python2}

   cd "$srcdir/pytools-${pkgver}"
   python setup.py build

   cd "${srcdir}/pytools-${pkgver}-python2"
   python2 setup.py build
}

package_python2-pytools() {
   depends=('python2' 'python2-decorator')
   cd "${srcdir}/pytools-${pkgver}-python2"
   python2 setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
}

package_python-pytools(){
   depends=('python' 'python-decorator')
   cd "${srcdir}/pytools-${pkgver}"
   python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
}
